let lessons = `
js,200元,300次
php,300.00元,100次
node.js,180元,250次
`;
let reg = /(\d+)(\.00)?(?=元)/gi;
lessons = lessons.replace(reg, (v, ...args) => {
  //   console.log(args);
  args[1] = args[1] || ".00";
  return args.splice(0, 2).join("");
});
console.log(lessons);
